Option Explicit
Sub G_Sample003()
    Dim myShp As Shape
    Dim myMcr As String
    Dim mySht As Worksheet
    Set mySht = ActiveSheet			'N
    myMcr = "W"				'wW
    'sWAutoShape
    Set myShp = mySht.Shapes.AddShape(Type:=msoShapeRectangle,Left:=100, _
		Top:=100, Width:=100, Height:=100)
    myShp.OnAction = myMcr
    Set myShp = Nothing			'
    Set mySht = Nothing
End Sub

